<template>
  <el-select v-model="value" placeholder="未处理" @change="changeState">
            <el-option
              v-for="item in state"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
</template>

<script>
export default {
  name:'selectState',
  props:{
    truestate:{
      type: Number,
      default: 3,
    }
  },
  created(){
    if(this.truestate === 2){
      this.value = ''
    }
  },
  data(){
    return {
      value: this.truestate,
      state:[
        {
          value:1,
          label:"通过"
        },
        // {
        //   value:2,
        //   label:"未处理"
        // },
        {
          value:3,
          label:"不通过"
        }
      ],
    }
  },
  methods:{
    changeState(value){
      this.$emit('itemchange', value)
    },
  }
}
</script>

<style>

</style>